home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
tlxjwpc5.zip
/
RBBSN3.SLT
< prev
next >
Wrap
Text File
|
1990-09-21
|
8KB
|
268 lines
//╔═════════════════════════════════════════════════════════════════════╗
//║ RBBS 17.3A JW-PC Consulting DataFlex.HST (608)837-1923 ║
//║ Dual Std HST/V.32/MNP5/V.42 RBBSnet 8:972/2 FIDOnet 1:121/8 ║
//╚═════════════════════════════════════════════════════════════════════╝
// RBBSN3.SLT by Jim Wargula, Sysop of JW-PC DataFlex.HST, 09-20-90.
// This is a sample TELIX script for logging on to JW-PC DataFlex.HST.
// It will log in, download SMLNET sequence list new messages, and start
// to read main base messages. The name of the bbs will show on the
// status line.
str user_name[30] = "YOUR NAME ";
// Put your name in the above line. The script will get the proper password
// from the dialing directory (Telix puts that password in the script system
// variable called _entry_pass). Use spaces as in example!
// Before using this script for the first time, or when you make a change,
// type 'cs rbbsn3' at the DOS prompt to compile the script for use by Telix.
//////////////////////////////////////////////////////////////////////////////
// globals
//
// used by showname():
//
int statline = 24; // Telix status line row
int statback = 7; // status line background color
int statfore = 0; // status line foreground color
str failed[] = "Logon failed.";
// DSZ stuff
str dsz[80] =
"c:\util\DSZ port ";
str upld[31] =
" pW1 pB4096 ha sl sz -b -m -rr ";
str dnld[31]=
" pW1 pB4096 ha sl rz -b -m -rr ";
str port[1];
//////////////////////////////////////////////////////////////////////////////
// main routine
//
main()
{
int stat;
int t1, t2, t3, t4, t5, t6, t7, t8, t9;
int tmark;
alarm(1); // connect!
itos(get_port(),port);
showname();
if (not _entry_pass) // no pass, so didn't recog. board
{
prints ("Sorry, I don't know the password for this BBS!");
return;
}
strcat (user_name, _entry_pass); // build name for turbo login
strcat (user_name, " !");
t1 = track ("ontinue", 1); // define tracks
t2 = track ("First name?", 1);
t3 = track (" ([Y],N", 1);
t4 = track (">? ", 1);
t5 = track ("Name ->", 1);
t6 = track ("Type ->", 1);
t7 = track (" (Y/[N]", 1);
t8 = track ("(A,Y,[N])", 1);
t9 = track ("**", 1);
delay_scr (80); // wait 8 seconds for front end
cputs ("^["); // send escape to wake bbs up!
tmark = timer_start (6000); // wait up to 10 minutes for login Part I
//////////////////////////////////////////////////////////////////////////////
// Loop I - Login, open NET door, extract messages.
//
while (not time_up (tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit (0); // see which (if any) track was hit
if (stat == t1) // respond to Key to continue
{
delay (5);
cputs ("^M");
}
else if (stat == t2) // send name and password
{
cputs (user_name);
cputs ("^M");
}
else if (stat == t3) // send "NO"
{
cputs ("n^M");
}
////////////////////////// comment out or delete section of code
////////////////////////// between these and comment bars below
////////////////////////// for standard login - no netmail called
else if (stat == t4) // main menu...
{
delay (2);
cputs ("d net^M"); //open Net Door
}
else if (stat == t5) //net conference menu...
{
delay (2);
cputs ("q^M"); //get function menu
}
else if (stat == t6) //start new extract
{
delay (2);
cputs ("n^M");
}
else if (stat == t7) //select sequence list
{
delay (2);
cputs ("n^M");
}
else if (stat == t8) //extract all sequence conferences
{
delay (2);
cputs ("a^M");
break; //goto next section tracking
}
}
if (time_up (tmark))
{
prints ("Part I failed!");
return;
}
timer_free (tmark); // free timer channel
tmark = timer_start (12000); // wait up to 20 minutes for login Part II
//////////////////////////////////////////////////////////////////////////////
// Loop II - Download extract file
//
while (not time_up (tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit (0); // see which (if any) track was hit
if (stat == t1) // respond to continue
{
delay (5);
cputs ("^M");
}
else if (stat == t6) // download extract file
{
delay (5);
cputs ("d z z^M");
}
else if (stat == t9) // call zmodem
{
strcat(dsz,port);
strcat(dsz,dnld);
strcat(dsz,_down_dir); //using ZmodemMobyturbo
dos(dsz,0);
}
else if (stat == t7) //select sequence list
{
delay (2);
cputs ("y^M");
break; //goto next section tracking
}
}
if (time_up (tmark))
{
prints ("Part II failed!");
return;
}
timer_free (tmark); // free timer channel
tmark = timer_start (1800); // wait up to 3 minutes for login Part III
//////////////////////////////////////////////////////////////////////////////
// Loop III - Exit NET door, read messages
//
while (not time_up (tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit (0); // see which (if any) track was hit
if (stat == t6) // good-bye to SMLnet door
{
delay (5);
cputs ("g^M");
}
////////////////////////// comment out or delete section of code
////////////////////////// between these and comment bars above
////////////////////////// for standard login - no netmail called
else if (stat == t4) // main menu back
{
cputs ("r s^M");
break; // read msgs & done
}
}
//////////////////////////////////////////////////////////////////////////////
// End - Clean-up
//
if (time_up (tmark))
{
prints ("Part III failed!");
return;
}
timer_free (tmark); // free timer channel
track_free (0); // and all track channels
alarm (5); // sound alarm, we're there!
}
//////////////////////////////////////////////////////////////////////////////
// Function: showname
// Description: Displays the name of the system you're connected to, or
// "Alt-Z for Help" if you're not connected to anything.
//
// You can plug this into ANY logon script file, just call it
// as shown in main().
//
// This routine will overwrite the "Alt-Z for Help" message,
// but I think it's worth it. If you don't like this feature,
// set the Anonymous option in SLCONFIG to 'y' (YES).
// Parameters: none
// Returns: nothing
//
showname()
{
str name[14]; // name to display
int x, y; // old cursor position
x = getx(); // save current position
y = gety(); //
substr(_entry_name, 0, 14, name); // get the current BBS name
if ((strlen(name) == 0) || (! carrier())) // no name or not connected?
name = "Alt-Z for Help"; // then display help message
strcat(name, " "); // pad name with spaces
pstraxy( name, 1, statline, // display it
(statback * 16) + statfore
);
gotoxy(x, y); // return to saved position
}